package com.sg.dto.biz.component.common;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Objects;

/**
 * @desc MarkdownDataListTurnToTextDto
 * @使用场景
 */
@Data
public class MarkdownDataListTurnToTextDto
        extends BaseDto
        implements Serializable {

    /**
     * 通用主键ID
     */
    @NotNull(message = "通用主键ID不能为空")
    @ApiModelProperty("通用主键ID")
    private String commPrimaryKey;

    /**
     * markdown文本内容
     */
    @NotNull(message = "markdown文本内容不能为空")
    @ApiModelProperty("markdown文本内容")
    private String markdownContent;
    /**
     * 自定义字段
     */
    @ApiModelProperty("自定义字段")
    private String customField;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        MarkdownDataListTurnToTextDto that = (MarkdownDataListTurnToTextDto) o;
        return commPrimaryKey == that.commPrimaryKey && markdownContent == that.markdownContent && customField == that.customField;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), commPrimaryKey, markdownContent, customField);
    }

}
